#include "VolumeRenderPCH.h"
#include "Cube.h"
#include "VolumeObj.h"
#include "TFObj.h"
#include "DVRMethodsDef.h"
#include "DVRPass.h"
#include "ScreenQuadPass.h"
#include "LLOITBuildListsPass.h"
#include "LLOITColorBlendPass.h"
#include "CustomGUI.h"

int main()
{
	{
		//If there are strange bugs, maybe the version of third-party libs is too high.

#ifdef USING_ALL_METHODS
		ResourceManager::registerSharedData("DVRMethod", EDVRMethod::GENERAL_DVR);
#endif // USING_ALL_METHODS

		WINDOW_KEYWORD::setIsCursorDisable(false);
		WINDOW_KEYWORD::setWindowSize(1280, 720);

		COMPONENT_CONFIG::setIsEnableGUI(true);

		ResourceManager::registerGameObject(std::make_shared<CCube>("Cube", 1));
		ResourceManager::registerGameObject(std::make_shared<CVolumeObj>("Volume", 2));
		ResourceManager::registerGameObject(std::make_shared<CTFObj>("TF", 3));

#ifdef USING_GENERAL_DVR
		ResourceManager::registerRenderPass(std::make_shared<CDVRPass>("DVRPass", 1));
		//Add this pass for debug usage.
		//TODO: use _DEBUG macro to switch.
		ResourceManager::registerRenderPass(std::make_shared<CScreenQuadPass>("ScreenQuadPass", 2));
#endif // USING_GENERAL_DVR
#ifdef USING_LINKED_LIST_OIT
		ResourceManager::registerRenderPass(std::make_shared<CLLOITBuildListsPass>("LLOITBuildListPass", 3));
		ResourceManager::registerRenderPass(std::make_shared<CLLOITBlendColorPass>("LLOITColorBlendPass", 4));
#endif // USING_LINKED_LIST_OIT
#ifdef USING_WAVELET_OIT
		//TODO
#endif // USING_WAVELET_OIT
#ifdef USING_MOMENT_BASED_OIT
		//TODO
#endif // USING_MOMENT_BASED_OIT

		ResourceManager::registerSubGUI(std::make_shared<CCustomGUI>("CustomGui", 1));

		App::initApp();
		App::updateApp();
	}

	return 0;
}